# encoding: utf-8
"""
Serialization schemas for Zones resources RESTful API
----------------------------------------------------
"""

from flask_marshmallow import base_fields
from flask_restplus_patched import ModelSchema

from .models import AutoTest


class BaseZonesSchema(ModelSchema):
    """
    Base team schema exposes only the most general fields.
    """

    class Meta:
        model = AutoTest
        fields = (
            AutoTest.id.key,
            AutoTest.name.key,
            AutoTest.parent_id.key,
            AutoTest.root_case.key,
            AutoTest.index.key,
            AutoTest.is_case.key,
            AutoTest.path.key,
            "childs"
        )

        dump_only = (
            AutoTest.id.key
        )
